package com.cyh.core.login.repository;

import com.cyh.core.framework.repository.base.DefaultRepository;
import com.cyh.core.login.entity.Role;

import org.springframework.data.jpa.repository.Query;

import javax.annotation.Resource;

@Resource
public interface RoleRepository extends DefaultRepository<Role, Integer> {

    @Query(value = "select * from role where rid = ? ",nativeQuery = true)
    public Role findByRoleid (Integer id);

    @Query(value = "select * from role where rname like %?% ",nativeQuery = true)
    public Role findByRolenameLike (String name);

}
